package com.eascs.web.o2o.report.dao;

import com.eascs.app.dao.JdbcSession;
import com.eascs.app.dao.PageResult;
import com.eascs.app.dao.SqlPageQuery;
import org.springframework.stereotype.Repository;

import javax.inject.Inject;
import java.util.List;

@Repository
public class FefundDao {
	@Inject
	JdbcSession jdbcSessionForOaWithModify;
	
	@Inject
	JdbcSession jdbcSessionForOracle;

	/**
	 * 分页查询
	 * 
	 * @param sqlPageQuery
	 * @return
	 */
	public <T> PageResult<T> findDataWithPage(SqlPageQuery<T> sqlPageQuery) {
		return this.jdbcSessionForOracle.findDataWithPage(sqlPageQuery);
	}
	
	public List<Object[]> findParams(String sql,Object...params ){
		return this.jdbcSessionForOracle.findObjectsList(sql, params);
	}
	
	//@Transactional(transactionManager = "transactionManagerDbForWorkflow")
	public int excuteSql(String sql, Object... params) {
	    return jdbcSessionForOaWithModify.execute(sql, params);
	}
	

}
